module arr_order_mthd;

string s[] = '{"one", "two", "three"};

initial
begin
   $display("The intialized string");
   for ( int j = 0; j<s.size; j++ ) $write("%s ", s[j] ) ;
   s.reverse;
   $display("\n The reversed 1D array");
   for ( int j = 0; j<s.size; j++ ) $write("%s ", s[j] ) ;
   s.sort;
   $display("\n The sorted array in ascending order");
   for ( int j = 0; j<s.size; j++ ) $write("%s ", s[j] ) ;
   s.rsort;
   $display("\n The sorted array in descending order");
   for ( int j = 0; j<s.size; j++ ) $write("%s ", s[j] ) ;
   s.shuffle;
   $display("\n The shuffled array");
   for ( int j = 0; j<s.size; j++ ) $write("%s ", s[j] ) ;
   s.shuffle;
   $display("\n The shuffled array");
   for ( int j = 0; j<s.size; j++ ) $write("%s ", s[j] ) ;
end

endmodule
